package com.songlanyun.modules.loverecord.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.enums.IntegralConstant;
import com.songlanyun.common.enums.LoveConstant;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.integralrecord.entity.IntegralRecord;
import com.songlanyun.modules.loverecord.entity.UserLoveRecordEntity;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 会员爱心值的收支记录
 *
 * @author wuchao
 * @email songlanyun@gmail.com
 * @date 2022-08-09 16:56:00
 */
public interface UserLoveRecordService extends IService<UserLoveRecordEntity> {

    PageUtils queryPage(Map<String, Object> params);


    /**
     * 保存爱心记录
     *
     * @param userId    会员ID
     * @param billType  增加或者减少
     * @param value     爱心值
     * @param modelType 操作类型
     * @param modelId   操作ID
     * @param remark    备注
     */
    UserLoveRecordEntity add(Long userId, Boolean billType, Integer value, LoveConstant.ModelType modelType, Long modelId, String remark);

    void loveValueExchange(Long userId, Integer loveValue);
}

